package com.ruoyi.keep.service.impl;

import java.util.List;

import com.ruoyi.keep.domain.FitnessPurposes;
import com.ruoyi.keep.domain.Informisnew;
import com.ruoyi.keep.domain.UserPurposeMiddle;
import com.ruoyi.keep.mapper.FitnesspurposesMapper;
import com.ruoyi.keep.mapper.InformisnewMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.keep.mapper.CommonUsersMapper;
import com.ruoyi.keep.domain.CommonUsers;
import com.ruoyi.keep.service.ICommonUsersService;
import org.springframework.transaction.annotation.Transactional;

/**
 * 普通用户管理Service业务层处理
 * 
 * @author xjl
 * @date 2024-08-13
 */
@Service
public class CommonUsersServiceImpl implements ICommonUsersService
{
    @Autowired
    private CommonUsersMapper commonUsersMapper;


    /**
     * 查询普通用户管理
     * 
     * @param id 普通用户管理主键
     * @return 普通用户管理
     */
    @Override
    public CommonUsers selectCommonUsersById(Integer id)
    {
        return commonUsersMapper.selectCommonUsersById(id);
    }

    /**
     * 查询普通用户管理列表
     * 
     * @param commonUsers 普通用户管理
     * @return 普通用户管理
     */
    @Override
    public List<CommonUsers> selectCommonUsersList(CommonUsers commonUsers)
    {
        return commonUsersMapper.selectCommonUsersList(commonUsers);
    }

    /**
     * 新增普通用户管理
     * 
     * @param commonUsers 普通用户管理
     * @return 结果
     */
    @Override
    public int insertCommonUsers(CommonUsers commonUsers)
    {
        return commonUsersMapper.insertCommonUsers(commonUsers);
    }

    /**
     * 修改普通用户管理
     * 
     * @param commonUsers 普通用户管理
     * @return 结果
     */
    @Override
    public int updateCommonUsers(CommonUsers commonUsers)
    {
        return commonUsersMapper.updateCommonUsers(commonUsers);
    }

    /**
     * 批量删除普通用户管理
     * 
     * @param ids 需要删除的普通用户管理主键
     * @return 结果
     */
    @Override
    public int deleteCommonUsersByIds(Integer[] ids)
    {
        return commonUsersMapper.deleteCommonUsersByIds(ids);
    }

    /**
     * 删除普通用户管理信息
     * 
     * @param id 普通用户管理主键
     * @return 结果
     */
    @Override
    public int deleteCommonUsersById(Integer id)
    {
        return commonUsersMapper.deleteCommonUsersById(id);
    }


    /*
     * 根据id查询该用户的详细信息*/
    @Override
    public List<CommonUsers> selectCommonUsersInfoByUserId(Integer Id) {
        return commonUsersMapper.selectUserInfoById(Id);
    }

    @Override
    public List<CommonUsers> selectCardById(Integer id) {
        return commonUsersMapper.selectCardById(id);
    }

    @Override
    public List<CommonUsers> selectAddressById(Integer id) {
        return commonUsersMapper.selectAddressById(id);
    }

    @Override
    public CommonUsers selectOrderById(Integer id) {
        System.out.println();
        return commonUsersMapper.selectOrderById(id);
    }

    @Override
    public List<CommonUsers> selectOrderMoneyById(Integer id) {
        return commonUsersMapper.selectOrderMoneyById(id);
    }
}
